package com.xiangshizhineng.tianzhangzhi.app.model.response;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.xiangshizhineng.tianzhangzhi.app.common.base.BaseDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

@JsonInclude(JsonInclude.Include.NON_NULL)
@ApiModel("用户实体")
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("tz_user")
public class UserResponse extends BaseDTO implements Serializable {

    /**
     * 田长名称
     */
    @ApiModelProperty(value = "田长名称")
    @NotBlank(message = "田长名称为空")
    private String tzxm;

    /**
     *
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "部门")
    private String name;
    /**
     * 田长电话
     */
    @ApiModelProperty(value = "田长电话")
    private String tzdh;
    /**
     * 田长级别（1：县级田长；2：乡级田长；3：村级田长；4：网格员）
     */
    @ApiModelProperty(value = "田长级别（1：县级田长；2：乡级田长；3：村级田长；4：网格员）")
    private String tzjb;
    /**
     * 行政区划代码
     */
    @ApiModelProperty(value = "行政区划代码")
    private String xzqdm;
    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
    /**
     * 更新时间
     */
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    @ApiModelProperty(value = "上级田长信息")
    @TableField(exist = false)
    private List superior;
    @TableField(exist = false)
    private DistrictResponse districtResponse;
}
